import tensorflow as tf

#name给变量起名字
input1 = tf.constant([1.0, 2.0, 3.0], name='input1')
input2 = tf.Variable(tf.random_uniform([3]), name='input2')
add = tf.add_n([input1, input2], name='addOP')

with tf.Session() as sess:
    sess.run(tf.global_variables_initializer())
    #定义存储位置，生成的图像
    writer = tf.summary.FileWriter("./logs/tensorboard1", sess.graph)
    print(sess.run(add))
#释放Writer
writer.close()












